<?php
    $messages = View::getMessenger()->getMessages();
?>
                    <?php if (count($messages)): ?>
                    <ul id="messenger" class="messages">
                        <?php foreach ($messages as $message): ?>
                        <li class="<?php echo strtolower($message->type); ?>"><?php echo Translator::translate($message->text); ?></li>
                        <?php endforeach; ?>
                    </ul>
                    <?php endif; ?>